//
//  SelectListViewController.h
//  Etion
//
//  Created by  user on 11-2-8.
//  Copyright 2011 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger,XUIPickerPanelViewType)
{
    XUIPickerPanelViewTypeComBoBox = 0,
    XUIPickerPanelViewTypeDate,
    XUIPickerPanelViewTypeTime,
    XUIPickerPanelViewTypeDateTime
};

@class XUIPickerPanelView;

@protocol XUIPickerPanelViewDataSource<NSObject>

@optional

- (NSInteger)numberOfRowInPickerPanelView:(XUIPickerPanelView *)ppvcl;

- (NSString *)pickerPanelView:(XUIPickerPanelView *)ppvcl titleForRow:(NSInteger)row forComponent:(NSInteger)component;

- (NSInteger)defaultRowInPickerPanelViewController:(XUIPickerPanelView *)ppvcl;

- (void)pickerPanelView:(XUIPickerPanelView *)ppvcl selectedRowAtIndex:(NSInteger)nIndex;

- (void)pickerPanelView:(XUIPickerPanelView *)ppvcl selectedDate:(NSDate *)date;

- (NSDate *)currentDateInPickerPanelView:(XUIPickerPanelView *)ppvcl;

- (NSDate *)minDateInPickerPanelView:(XUIPickerPanelView *)ppvcl;

- (NSDate *)maxDateInPickerPanelView:(XUIPickerPanelView *)ppvcl;

@end

@protocol XUIPickerPanelViewDelegate<NSObject>

@optional

- (void)pickerPanelViewWillCancel:(XUIPickerPanelView*)ppvcl;
- (void)pickerPanelViewDidCancel:(XUIPickerPanelView*)ppvcl;

- (void)pickerPanelViewWillFinish:(XUIPickerPanelView*)ppvcl;
- (void)pickerPanelViewDidFinish:(XUIPickerPanelView*)ppvcl;

@end

@interface XUIPickerPanelView : UIView
{
    
}

@property(nonatomic, assign) id <XUIPickerPanelViewDataSource> dataSource;
@property(nonatomic, assign) id <XUIPickerPanelViewDelegate> delegate;
@property(nonatomic, assign) BOOL hiddenToolBar;
@property(nonatomic, strong) NSString *toolBarTitle;
@property(nonatomic, readonly) XUIPickerPanelViewType pickerPanelType;
@property(nonatomic, assign) NSUInteger vclType;

- (id)initWithPickerPanelType:(XUIPickerPanelViewType)type;

- (void)show;

- (void)pickerViewReloadAllRow;

#ifdef ETIONIPAD
- (void)resetPickerViewSize:(CGSize)size;
#endif
@end
